package moe.kotake.webbehw.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import moe.kotake.webbehw.entity.content;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import javax.annotation.Resource;
import java.util.List;
@Resource
public interface contentMapper extends BaseMapper<content> {
    @Select("select * from content where poster = #{poster}")
    List<content> selectAllByPoster(@Param(value = "poster") Long poster);
    @Select("select * from content where poster = #{poster} and id = #{id}")
    List<content> selectByIdAndPoster(@Param(value = "id") Long id,@Param(value = "poster") Long poster);
}
